package com.yun.zhong.fu.sharecenter.sentinel;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.client.RestTemplate;

/**
 * @Author RenPu
 * @Date 2020/12/29 15:32
 * @Version 1.0
 * @Description:
 **/

@Slf4j
public class SentinelTest {


    public static void main(String[] args) throws InterruptedException {
        RestTemplate restTemplate = new RestTemplate();
        for (int i = 0; i < 10000; i++) {
            String forObject = restTemplate.getForObject("http://localhost:8002/actuator/sentinel", String.class);
            Thread.sleep(500);
        }
    }

    public static void main1(String[] args) {
        RestTemplate restTemplate = new RestTemplate();
        for (int i = 0; i < 10000; i++) {
            String forObject = restTemplate.getForObject("http://localhost:8002/testA", String.class);

            log.info("---------" + forObject + "--------------");
        }

    }

}
